<?php

abstract class User_Models_Interface_User {
	
	abstract protected function doLogin($jsonObject);
	
	abstract protected function doInsert($json);
	abstract protected function doUpdate($json);
	
	abstract protected function doDelete($userId);
	
	abstract protected function doPrimarykey($userId);

	abstract protected function doGetList($json);
	
	/**
	 *  
	 * @desc: kiem tra thong tin thanh vien
	 * @param {
	 * 		'username'=>'truonghm'
	 * 		,'password'=>'123456'
	 * }
	 * @return { 
	 * 		'success'=>'true/false'
	 * 		,'errors'=>'info errors'
	 * 		}
	 * @deprecated 
	 */
	public function login($jsonObject){
    	//$this->init();
        $result = $this->doLogin($jsonObject); 
        //$this->finish();
        return Zend_Json::encode($result);
    }
    /**
     * 
     * @param json thong tin tren form them moi
     * them moi thanh vien vao bang user vaf user role
     */
    public function insert($json)
    {
    	$result = $this->doInsert($json);
    	return $result;
    }
    
	public function update($json)
    {
    	$result = $this->doUpdate($json);
    	return $result;
    }
    
	public function getList($json)
    {
    	return $this->doGetList($json);
    }
    
	public function delete($userId)
    {
    	$result = $this->doDelete($userId);
    	return $result;
    }
    
	public function primarykey($uid)
    {
    	$result = $this->doPrimarykey($uid);
    	return $result;
    }
    
	public function lock($userId)
    {
    	$result = $this->doLock($userId);
    	return $result;
    }
    
	public function unlock($userId)
    {
    	$result = $this->doUnlock($userId);
    	return $result;
    }
}

?>